<template>
  <div id="sign">
    <el-row>
      <mu-appbar title="个性签名配置" style="background-color:#409EFF">
        <mu-icon-button  icon="arrow_back_ios" slot="left" :to="{name: 'GmMenu' }"/>
      </mu-appbar>
    </el-row>

    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="玩家ID">
        <el-input v-model="form.uid" size="mini"></el-input>
      </el-form-item>
      <el-form-item label="添加/删除">
        <el-radio v-model="form.radio" label="1">添加</el-radio>
        <el-radio v-model="form.radio" label="0">删除</el-radio>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">保存</el-button>
      </el-form-item>
    </el-form>

  </div>
</template>

<script>
  export default {
    data () {
      return {
        form: {
          uid: '',
          radio: '1'
        }
      }
    },
    methods: {
      onSubmit () {
        if (this.form.uid === '') {
          return false
        }
        let that = this
        this.$axios({
          method: 'get',
          url: '/api/CarrieroperatorService.setSign',
          params: this.form,
          async: false
        })
        .then(function (resp) {
          if (resp.data.status === 'success') {
            that.$message({
              showClose: true,
              message: '保存成功',
              type: 'success'
            })
          } else {
            that.$message({
              showClose: true,
              message: resp.data.cause,
              type: 'warning'
            })
          }
        })
      }
    }
  }
</script>

<style>
#sign  .el-row {
  margin-bottom: 16px;
}
#sign  .el-col {
  margin-bottom: 8px;
}
</style>
